<?php

use Hyperf\Database\Schema\Schema;
use Hyperf\Database\Schema\Blueprint;
use Hyperf\Database\Migrations\Migration;
return new class extends Migration
{
    /**
     * Run the migrations.
     */
    public function up(): void
    {
        Schema::create('rd_organize_area_stand', function (Blueprint $table) {
            $table->comment('站点表');
            $table->bigIncrements('id')->comment('主键');
            $table->bigInteger('area_id')->comment('所属工区ID');
            $table->bigInteger('proj_line_id')->comment('所属项目ID');
            $table->bigInteger('zone_id')->comment('所属大区ID');
            $table->string('name', 255)->comment('站点名称');
            $table->string('abbr', 255)->nullable()->comment('缩写')->default(null);
            $table->string('addr', 255)->nullable()->comment('地址')->default(null);
            $table->decimal('longitude', 10, 6)->nullable()->comment('经度');
            $table->decimal('latitude', 10, 6)->nullable()->comment('纬度');
            $table->tinyInteger('status')->default(1)->comment('状态:1=正常,2=停用');
            $table->integer('sort')->default(0)->comment('排序');
            $table->authorBy();
            $table->timestamps();
            $table->softDeletes();
            $table->string('remark')->comment('备注')->default('');
        });
    }
    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::dropIfExists('rd_organize_area_stand');
    }
};